import qs from 'qs'

export function getToken () {
  const params = {
    grant_type: 'client_credentials',
    client_id: 'ZCRueKzVcLw9ysOtlNQd7rf8',
    client_secret: 'RNFtQi4d7FC1IhsPE2WoT2GEaNLNYHIP'
  }
  return this.$axios
    .post('https://aip.baidubce.com/oauth/2.0/token', qs.stringify(params), {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    })
}
